﻿using Auth.Dtos.System;
using Auth.Models;
using Auth.Models.System;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace Auth.Application.IServices.System
{
    /// <summary>
    /// 服务接口
    /// </summary>
    public interface ISettingService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>

        Task<Guid?> InsertAsync(SettingDto dto);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
       Task<bool> DeleteAsync(SettingDto dto);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(SettingDto dto);

        /// <summary>
        /// 查询单条记录
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<SettingDto> GetAsync(Guid id);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        Task<PagedList<SettingDto>> GetPagedListAsync(SettingModel model);

        /// <summary>
        /// 查询所有记录
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<IEnumerable<SettingDto>> CountAsync(SettingModel model);

        /// <summary>
        /// 根据key查询列表
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<List<SettingDto>> GetListAsync(string key);
    }
}
